From 277ecacff2aa0ecd343a181605dff87e660b5f83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Tue, 1 Apr 2014 22:55:47 +0000 Subject: [PATCH] Return $wgSitename as displayname for local repo in filerepoinfo API displayname is used in user interface texts to tell the user what is the source of a file so returning null does not make sense here. Bug: 64800 Change-Id: Iafbc1a8e63b512d1515215fa1295e5b7434f1861 --- includes/filerepo/FileRepo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 888af377be..90c350b3f7 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1734,9 +1734,10 @@ class FileRepo { * @return string */ public function getDisplayName() { - // We don't name our own repo, return nothing + global $wgSitename; + if ( $this->isLocal() ) { - return null; + return $wgSitename; } // 'shared-repo-name-wikimediacommons' is used when $wgUseInstantCommons = true -- 2.20.1